package com.nulldev.util.web.HttpServer3.extensions.flexiProxy.internal;

import java.util.Map;

import com.nulldev.util.web.HttpServer3.extensions.flexiProxy.FlexiProxyRule;

public class FlexiProxyInternalDebugRule implements FlexiProxyRule {

	@Override
	public FlexiProxyAction handle(final String url, final Map<String, String> headers) {
		if (url.startsWith("flexiproxy-debug")) {
			return FlexiProxyAction.FLEXI_PROXY_REDIRECT_TO_CUSTOM_HANDLER;
		} else {
			return FlexiProxyAction.FLEXI_PROXY_ALLOW;
		}
	}

}
